Florian Müllner [Mon, 14 Aug 2023 23:55:47 +0000 (01:55 +0200)]
ci: Use sudo to run meson install
Meson stopped using polkit for automatic privilege elevation, and
will no longer attempt any priviledge elevation when not running
interactively.
Running the entire install command as root used to be problematic
in the past, as it could result in ownership changes of files in
the build directory that would result in build failures later,
but the aforementioned change leaves us with little choice.
Apparently `meson install` will spawn `ninja` with dropped
privileges when a rebuild is needed, so hopefully this will
no longer be an issue.
Brendan William [Wed, 9 Aug 2023 17:40:35 +0000 (10:40 -0700)]
weather: Prevent setting Geoclue source as location name
Prior to Geoclue v2.7, the location description did not seem to ever be
set. Now, the source used to determine the location is set as the
description. This can result in the location name in dateMenu to be set
as "WiFi", "GeoIP", etc., since we relay the description as the location
name to GWeather. Instead, pass an empty string so GWeather continues
to set the location name itself.
Chris Heywood [Sun, 21 Aug 2022 03:55:46 +0000 (13:55 +1000)]
messageList: Allow dismissal via backspace
Currently only the delete key can be used to dismiss notifications.
Some laptops don't have delete keys, resulting in needing to hit a
modifier to trigger delete.
Plus, on those keyboards that do have delete keys they're often a
little harder to strike than backspace.
Florian Müllner [Mon, 14 Aug 2023 18:39:34 +0000 (20:39 +0200)]
panel: Don't expand camera quick settings items
The camera indicator currently doesn't have any items, but if
we were to add one, it would almost certainly be a regular
toggle rather than a slider that needs expanding.
Florian Müllner [Sun, 13 Aug 2023 17:12:27 +0000 (19:12 +0200)]
extensions/shared: Don't cache detected URL
The translation functions we export from extension utils must
work with all extensions, not only the first that calls one
of the functions.
That means that we are back to examining a backtrace for every
function call unless an extension defined its own translation
functions with `import.meta.url`.
workspaceAnimation: Sync progress with main adjustment
Create a derived workspaces adjustment using the new API, and
bind it to the 'progress' property. This is only done by the
MonitorGroup representing the primary monitor.
The progress value that WorkspaceAnimation operates on
represents the percentage within the workspaceIndices array
we are, so make sure to transform the percentage to the
correct workspace index.
overviewControls: Use new workspaces adjustment API
Derive the workspaces adjustment used by OverviewControls (and
shared with WorkspacesView) from the main workspaces adjustment
using the new Main.createWorkspacesAdjustment() method.
And a way to derive "sub"-adjustments from the main one.
The main and private StAdjustment properly represents
workspaces, and has all relevant properties (lower, upper,
and value) set by the workspace manager.
The main adjustment is not bound to any particular actor,
which means we cannot call the 'ease' method directly.
Consumers of this API should create adjustments using
Main.createWorkspacesAdjustment(), and this new adjustment
is bound to the actor that the consumer passed. Consumers
must not change any property of the derived adjustment other
than the 'value' property.
The 'value' property is synchronized between all adjustments
created, which guarantees that all elements that represent
workspaces can have a shared and up-to-date understanding of
where in the workspace layout we are.
Dallas Strouse [Fri, 11 Aug 2023 15:20:53 +0000 (15:20 +0000)]
util: Export trySpawn()
It was private before, and so any users of it (including the
Background Apps menu) would fail to utilize it, making apps fail
to get told to shut down from the Background Apps menu.
Florian Müllner [Thu, 10 Aug 2023 15:50:08 +0000 (17:50 +0200)]
tests/unit: Access shell sources from resource
Unit tests currently load shell sources directly from the
filesystem.
This is currently blocking generated sources - namely config.js - to
ESM, because a relative import from the source dir will fail to
locate the file in the build dir.
Address this by using the same GResource as gnome-shell instead of
direct filesystem access, as the resource will always include all
sources files at the expected location.
Out of the members of the notification daemon(s), these are the most
necessary and flexible to override. The daemons are used as singletons
and notifications are rather temporary, while the sources are more
flexible and make the most sense to override (and revert).
Florian Müllner [Wed, 9 Aug 2023 14:24:07 +0000 (16:24 +0200)]
screenshot: Export showScreen*UI() functions
showScreenshotUI() is needed by the system action, and
showScreenRecordingUI() is conceptually so similar that
it would be odd to export one and not the other.
Florian Müllner [Mon, 7 Aug 2023 01:26:04 +0000 (03:26 +0200)]
ci: Simplify run-eslint script
Now that all code conforms with the new style, we can remove all
the tricky bits that compare errors from regular- and legacy
config or limit checks to changed lines from a git diff.
All that is left over the eslint CLI tool is the ability to output
results both as junit for gitlab and plain text for logs without
duplicating the linting, but that's well worth preserving.
Florian Müllner [Mon, 7 Aug 2023 01:24:35 +0000 (03:24 +0200)]
ci: Remove eslint_mr job
There is no longer a difference between regular- and legacy config.
That means that all code now follows the regular configuration, and
we no longer need a separate check that enforces this for new code.
Florian Müllner [Mon, 7 Aug 2023 01:15:51 +0000 (03:15 +0200)]
cleanup: Fixup wrong JSDoc comments
There are a handful of JSDoc comments that are invalid or don't
conform to the configured format. Fix them to remove the last
remaining bit of legacy configuration.
Florian Müllner [Sun, 6 Aug 2023 22:40:20 +0000 (00:40 +0200)]
cleanup: Remove spaces in object literals
We only adopted this style relatively recently, so there's a bit
more to adjust. Still, it's manageable and another step towards
getting rid of the legacy style.
Carlos Garnacho [Tue, 8 Aug 2023 22:26:52 +0000 (00:26 +0200)]
st: Mass update to ClutterActorClass event vmethod changes
These are now forwarded as ClutterEvent in order to remain accessible
on the Javascript side. This also means all ClutterActor implementations
in ST need to update to this change.
Carlos Garnacho [Tue, 8 Aug 2023 16:22:11 +0000 (18:22 +0200)]
js: Avoid Clutter.get_current_event() in Clutter.Actor event vfuncs
We sometimes obtained the current event through the general machinery
just so we could pass it along as a ClutterEvent instead of a specialized
subtype.
We now get that out of the box, so may avoid getting the current event
which is just a cast of the same current event we already have.
Carlos Garnacho [Tue, 8 Aug 2023 16:14:04 +0000 (18:14 +0200)]
js: Mass move to Clutter.Event getter methods in Clutter.Actor vfuncs
These traditionally got the various ClutterEvent subtype structs as their
argument, so it was not allowed to use ClutterEvent generic getter methods
in these vfuncs. These methods used direct access to struct fields instead.
This got spoiled with the move to make ClutterEvent opaque types, since
these are no longer public structs so GNOME Shell most silently failed to
fetch the expected values from event fields. But since they are not
ClutterEvents either, the getters could not be used on them.
Mutter is changing so that these vmethods all contain an alias to the
one and only Clutter.Event type, thus lifting those barriers, and making
it possible to use the ClutterEvent methods in these vfuncs.
Carlos Garnacho [Wed, 9 Aug 2023 09:47:28 +0000 (11:47 +0200)]
inputMethod: Check that there is an existing cursor location
Commit 17d9ec5788fb made the input method call update() more eagerly,
but also at times that it does not have a cursor position yet. Make
it bail out correctly in that situation.
Fixes: 17d9ec5788fb ("inputMethod: Keep Capabilite.FOCUS before context.focus_in/focus_out")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2876>
Carlos Garnacho [Tue, 8 Aug 2023 14:10:39 +0000 (16:10 +0200)]
ui/slider: Handle emulated scroll events through the Clutter.EventFlags
Emulated scroll events no longer get event.is_pointer_emulated() set to
True, instead this information is propagated through the Clutter.EventFlags
of the event.
Carlos Garnacho [Tue, 8 Aug 2023 14:08:36 +0000 (16:08 +0200)]
st: Handle emulated scroll events through the ClutterEventFlag
Emulated scroll events no longer get clutter_event_is_pointer_emulated()
set to TRUE, instead this information is propagated through the
ClutterEventFlags of the event.
Takao Fujiwara [Wed, 1 Mar 2023 14:42:18 +0000 (23:42 +0900)]
inputMethod: Keep Capabilite.FOCUS before context.focus_in/focus_out
If context.focus_out() is called *after* context.set_capabilities(0),
The FocusOut D-Bus method is ignored because of no FOCUS capability.
If context.focus_out() is called *before* context.set_capabilities(0),
The 0 capability is set to the next focused context and the
FocusIn D-Bus method is ignored because of no FOCUS capability.
So context.set_capabilities(0) should not be called.
Florian Müllner [Mon, 7 Aug 2023 15:13:48 +0000 (17:13 +0200)]
js: Port dbusUtils to ESM
The module is shared between the various D-Bus services and the
main gnome-shell process, so it was originally left out to allow
porting different bits at their own speed.
Now that everything has been ported to ESM, there is no reason
to not move that particular module as well.
Florian Müllner [Sat, 5 Aug 2023 19:12:55 +0000 (21:12 +0200)]
status/backlight: Sync checked on level changes
Since switching to property bindings/notifications, value changes
only happen on actual changes, so we cannot rely on them as the sole
source of updating the checked state.
Daniel van Vugt [Thu, 23 Mar 2023 09:51:46 +0000 (17:51 +0800)]
main: Correct the pointer value of strtab on riscv/mips architectures
Glibc defines `d_ptr`/`d_val` to be a relocated address on most
architectures, except for riscv and mips where it is just an offset from
the binary load address. So we need to convert `strtab` from an offset
into a pointer for riscv and mips.
Internally within glibc there is the `D_PTR` macro for doing this, which
relies on private data hidden in an ABI-unstable part of `link_map`. So
we can't use the same conditional logic as glibc does internally.
Our solution is to detect when `strtab` is unreasonably low (below the
address of our binary) and so it must be an unrelocated offset. In that
case we just do the relocation manually.
Florian Müllner [Wed, 2 Aug 2023 16:09:46 +0000 (18:09 +0200)]
status/backlight: Notify slider value changes
The custom setter used by the slider item isn't emitting change
notifications, so the property binding that uses it as source
never propagates the new value.
We have always defaults to an empty ornament, so that menu items
are always aligned, even when radio items are used.
However radio items are fairly rare, so most of the time we end
up with an extra margin with no purpose. The design team now
prefers radio items to only align with each other, so that regular
items get the expected margin.